str = 'AABCDEFGHHIJ'
substring = str[1:9]      #使用切片操作提取子字符串
print(substring)             #输出结果